package com.firmboy.io_collection.collection;

import com.sun.javafx.scene.control.skin.VirtualFlow;
import org.junit.Test;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.LinkedList;

/**
 * list测试类
 *
 * @author firmboy
 * @create 2018-03-14 下午6:47
 **/
public class List {


    @Test
    public void test(){
        ArrayList list = new ArrayList();

        list.add(null);
        list.add("0");
        list.add("1");
        list.add("2");
        list.add("3");
        list.add("4");
        list.add("5");
        list.add("6");
        list.add("7");
        list.add("8");
        list.add("9");
        list.add("10");

        list.get(5);

        list.remove(2);

        System.out.println(Arrays.toString(list.toArray()));
    }

    @Test
    public void lindedListTest(){
        LinkedList linkedList = new LinkedList();

        linkedList.add("0");
        linkedList.add("2");

        linkedList.get(1);

        linkedList.remove("0");

        VirtualFlow.ArrayLinkedList arrayLinkedList = new VirtualFlow.ArrayLinkedList();

    }

    @Test
    public void treeSetTest(){


        ArrayList list = new ArrayList();

        ArrayList arrayList = new ArrayList();

        boolean b = list.retainAll(arrayList);
    }
}
